package com.yuefresh.core;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

import com.yuefresh.sys.User;

@MappedSuperclass
public class Model extends ModelAtom {
	private static final long serialVersionUID = -7841055429818865427L;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "CREATOR_FK")
	private User creator = null;
	@Column(name="CREATE_TIME")
	private Date createTime = new Date();
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "UPDATER_FK")
	private User updater = null;
	@Column(name="UPDATE_TIME")
	private Date updateTime = new Date();
	
	public Model() {}
	
	
	public User getCreator() {
		return creator;
	}

	public void setCreator(User creator) {
		this.creator = creator;
	}
	
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public User getUpdater() {
		return updater;
	}
	public void setUpdater(User updater) {
		this.updater = updater;
	}
	
}
